import request from "@/utils/request";
import { ParseData } from "@/utils/utils";

// 获取视频列表分页
export const GetVideoList = (data: any) => {
  return request({
    method: "GET",
    url: `/shipin?${ParseData(data)}`,
  });
};
// 获取视频详情
export const GetVideoDetail = (data: any) => {
  return request({
    method: "GET",
    url: `/shipin/xiangqing/${data.id}`,
  });
};
// 获取视频详情评论
export const GetVideoDetailComment = (data: any) => {
  return request({
    method: "GET",
    url: `/shipin/xiangqing/pinglun?${ParseData(data)}`,
  });
};
// 推荐/取消推荐
export const RecommendVideo = (data: any) => {
  return request({
    method: "PUT",
    url: `/shipin/tuijian/${data.id}`,
  });
};
// 上架/下架
export const ShelfVideo = (data: any) => {
  return request({
    method: "PUT",
    url: `/shipin/shangjia/${data.id}`,
  });
};
